@echo off

rd /s /q ..\CompiledBinaries
md ..\CompiledBinaries

rd /s /q Byond\bin
rd /s /q Byond\obj

rd /s /q Byond.Standalone\bin
rd /s /q Byond.Standalone\obj

rd /s /q Byond.Vst\bin
rd /s /q Byond.Vst\obj

C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe Byond.sln /p:Configuration=Synth /t:Rebuild /verbosity:m
if not %ERRORLEVEL%==0 pause

xcopy /q /y /E "Byond.Vst\bin\synth" "..\CompiledBinaries\Byond.Vst.Synth\"
xcopy /q /y /E "..\_byondUserFolder" "..\CompiledBinaries\Byond.Vst.Synth\FactoryLibrary\"
